package com.mebs.model;

import org.jt.jet.content.JetNamedObject;

public enum DimensionUnit implements JetNamedObject {
    IN(1, "Inches", "in", 0.0254),
    CM(2, "Centimeters", "cm", 0.01),
    FT(3, "Feet", "ft", 0.3048);

    public final int type;
    public final String name;
    public final String shortName;
    public final Double coef; // to 1 meter

    DimensionUnit(int type, String name, String shortName, Double coef)
    {
        this.type = type;
        this.name = name;
        this.shortName = shortName;
        this.coef = coef;
    }

    public static DimensionUnit getObjectByType(int type)
    {
        return DimensionUnit.values()[type - 1];
    }

    public Object getObjectId()
    {
        return type;
    }

    public String getObjectName()
    {
        return name;
    }

    public int getType()
    {
        return type;
    }

    public String getName()
    {
        return name;
    }

    public Double getCoef()
    {
        return coef;
    }

	public String getShortName() {
		return shortName;
	}
}
